from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_script import Manager
from flask_migrate import Migrate,MigrateCommand

app = Flask(__name__)
app.config["DEBUG"] = True
#设置数据配置信息
app.config['SQLALCHEMY_DATABASE_URI'] = "mysql://root:mysql@localhost:3306/xieyukun"
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False #设置压制警告

#使用db 创建SQAlchemy 创建数据库对象
db = SQLAlchemy(app)
# 通过Manager 关联app
manager = Manager(app)

#关联好以后,使用Migrate将app,和db关联起来
Migrate(app,db)

#给manger 添加操作指令
manager.add_command('db',MigrateCommand)
# 定义模型类
class Student(db.Model):
    id = db.Column(db.Integer,primary_key=True)
    name = db.Column(db.String(64),unique=True)
    age = db.Column(db.Integer)
    height = db.Column(db.Integer)

@app.route('/')
def Request():
    return "军航科技欢迎您...详情请咨询[15201304418]"


if __name__ == '__main__':

    manager.run()

a = 10 +50
print(a)

c = 100
<<<<<<< HEAD
oo = "ww"


